import ApiClient from '../base-api'

const menuApi = new ApiClient('/sys/menu')

// 查询菜单并暴露出去
export function getRoutes() {
  return menuApi.get('nav')
}

// 查询权限
export function getAuth() {
  return menuApi.get('auth')
}

// 查询菜单权限
menuApi.getAuthMenu = () => {
  return menuApi.get('getMenuAuth')
}

// 查询菜单列表
menuApi.getList = (searchData) => {
  return menuApi.post(`list`, searchData)
}

export default menuApi
